Skip to content

Conversation

@deltragon
Copy link
Collaborator

Description

Fixes #776.

Apparently GTK's fullscreen_on_monitor works differently on X11 if the window already exists vs before it is created.
(This however may just be a GTK bug too).

On Wayland either works fine in my testing.

See the added comment for details.
@deltragon
Copy link
Collaborator Author

I've tested this on XFCE (X11) with two screens - I can confirm this fixes the issue.
I've also tested that this works correctly on:
Wayland: KDE Plasma, GNOME, XFCE (experimental), Cinnamon (experimental)
X11: LXQt, Mate, Cinnamon

@deltragon
Copy link
Collaborator Author

(This however may just be a GTK bug too).

Maybe blaming this on GTK was too hasty - it only seems to happen on XFCE.

@archisman-panigrahi
Copy link
Collaborator

@deltragon It works! Tested in Linux Mint 22.2 XFCE.

@archisman-panigrahi archisman-panigrahi merged commit 494b4d4 into slgobinath:master Oct 2, 2025
6 checks passed
@archisman-panigrahi
Copy link
Collaborator

I wonder, how did you even figure out that switching the order of the two lines would fix the issue?

@deltragon deltragon deleted the x11-fix-fullscreen branch October 10, 2025 15:38
@deltragon
Copy link
Collaborator Author

@archisman-panigrahi Well, as I was speculating that this might be a bug in GTK, I was reading the source code of GTK.
And there I found that in gtk_window_fullscreen_on_monitor, there's different code that runs whether the window is "mapped" (i.e. shown) or not. Then I just figured I'd try what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesn't multi-screen in Xorg

2 participants